<!DOCTYPE html>


<html lang="en">
  

    <head>
      <meta charset="utf-8" />
        
      <meta name="description" content="時光的个人博客" />
      
      <meta
        name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1"
      />
	  <meta name="referrer" content="no-referrer" />

      <title> 時光</title>
  <meta name="generator" content="hexo-theme-ayer">
      
      <link rel="shortcut icon" href="/favicon.ico" />
       
<link rel="stylesheet" href="/dist/main.css">

      
<link rel="stylesheet" href="/css/fonts/remixicon.css">

      
<link rel="stylesheet" href="/css/custom.css">
 
      <script src="https://cdn.staticfile.org/pace/1.2.4/pace.min.js"></script>
       
 

      <link
        rel="stylesheet"
        href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-bulma@5.0.1/bulma.min.css"
      />
      <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.js"></script>

      <!-- mermaid -->
      
      <style>
        .swal2-styled.swal2-confirm {
          font-size: 1.6rem;
        }
      </style>
    <link rel="alternate" href="/atom.xml" title="時光" type="application/atom+xml">
</head>
  </html>
</html>


<body>
  <div id="app">
    
      
    <main class="content on">
      
<section class="cover">
    
      
      <a class="forkMe" href="https://github.com/Shen-Yu/hexo-theme-ayer"
        target="_blank"><img width="149" height="149" src="/images/forkme.png"
          class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1"></a>
    
  <div class="cover-frame">
    <div class="bg-box">
      <img src="/images/cover1.jpg" alt="image frame" />
    </div>
    <div class="cover-inner text-center text-white">
      <h1><a href="/">時光</a></h1>
      <div id="subtitle-box">
        
        <span id="subtitle"></span>
        
      </div>
      <div>
        
      </div>
    </div>
  </div>
  <div class="cover-learn-more">
    <a href="javascript:void(0)" class="anchor"><i class="ri-arrow-down-line"></i></a>
  </div>
</section>



<script src="https://cdn.staticfile.org/typed.js/2.0.12/typed.min.js"></script>


<!-- Subtitle -->

  <script>
    try {
      var typed = new Typed("#subtitle", {
        strings: ['面朝大海，春暖花开', '愿你一生努力，一生被爱', '想要的都拥有，得不到的都释怀'],
        startDelay: 0,
        typeSpeed: 200,
        loop: true,
        backSpeed: 100,
        showCursor: true
      });
    } catch (err) {
      console.log(err)
    }
  </script>
  
<div id="main">
  <section class="outer">
  
  
  

<div class="notice" style="margin-top:50px">
    <i class="ri-heart-fill"></i>
    <div class="notice-content" id="broad"></div>
</div>
<script type="text/javascript">
    fetch('https://v1.hitokoto.cn')
        .then(response => response.json())
        .then(data => {
            document.getElementById("broad").innerHTML = data.hitokoto;
        })
        .catch(console.error)
</script>

<style>
    .notice {
        padding: 20px;
        border: 1px dashed #e6e6e6;
        color: #969696;
        position: relative;
        display: inline-block;
        width: 100%;
        background: #fbfbfb50;
        border-radius: 10px;
    }

    .notice i {
        float: left;
        color: #999;
        font-size: 16px;
        padding-right: 10px;
        vertical-align: middle;
        margin-top: -2px;
    }

    .notice-content {
        display: initial;
        vertical-align: middle;
    }
</style>
  
  <article class="articles">
    
    
    
    
    <article
  id="post-网盘资源整合"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2023/04/18/%E7%BD%91%E7%9B%98%E8%B5%84%E6%BA%90%E6%95%B4%E5%90%88/"
    >网盘资源整合</a> 
</h2>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/04/18/%E7%BD%91%E7%9B%98%E8%B5%84%E6%BA%90%E6%95%B4%E5%90%88/" class="article-date">
  <time datetime="2023-04-18T14:02:53.000Z" itemprop="datePublished">2023-04-18</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%B7%A5%E5%85%B7%E7%AE%B1/">工具箱</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <h2 id="一、资源汇总"><a href="#一、资源汇总" class="headerlink" title="一、资源汇总"></a>一、资源汇总</h2><p><a target="_blank" rel="noopener" href="https://tuo.icodeq.com/">学习资源仓</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/7p9tppJHqpn">3000T资源合集</a></p>
<p><a target="_blank" rel="noopener" href="https://aliyun.panpanr.top/">阿里云盘资源导航</a></p>
<p><a target="_blank" rel="noopener" href="https://tuo.icodeq.com/quark">资源小海洋</a></p>
<p><a target="_blank" rel="noopener" href="https://docs.qq.com/sheet/DVXp5Q2dRTVRXb2VS?tab=oz0lgd">阿里土豆</a></p>
<p><a target="_blank" rel="noopener" href="https://docs.qq.com/sheet/DSlZmRHNtREpnaFFO?tab=BB08J2">壹起共享</a></p>
<p><a target="_blank" rel="noopener" href="https://www.kdocs.cn/l/cp92XFzxABRO">精品课程资源</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/6Aq37hB6kqr/folder/635e173a145adc1ee1c54da8840469a48e903ea0">影视放映厅</a></p>
<p><a target="_blank" rel="noopener" href="https://vip.yx1018.com/">考试教育资源</a></p>
<h2 id="二、学习"><a href="#二、学习" class="headerlink" title="二、学习"></a>二、学习</h2><h3 id="编程相关"><a href="#编程相关" class="headerlink" title="编程相关"></a>编程相关</h3><p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/7ScWBijmR2V/folder/636dcfeebccf6d1092c04208924af385de46a1e4">开发编程合集</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/PJqi5XRUvXa/folder/62972cdfcb6e33d2f1284929a84682eaf0da0760">编程开发相关资源</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/oP8JBzSdn9i/folder/6380bb34321af155e5a140cb9c8a6f8dbcac377a">编程资源合集</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/PJqi5XRUvXa/folder/6379cb084a530da97a4247dd8c865c2222f8b052">马士兵教育136课</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/eP7DqmJ5nR7">马士兵腾讯视频集课程</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/7ScWBijmR2V/folder/61a193386b174a9f1be94e93b1868ba5a61e0f86">拉钩教育后端视频课程</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/G6e3wZb6dP9">JAVA资料汇总</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/d3g5JQ8CJkQ">Python资料汇总</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/J58d9VDqY83">编程资源库</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/KMnJ4z7YaMw">项目实战专区(以尚硅谷项目为主)</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/7ScWBijmR2V">编程开发大合集</a></p>
<p><a target="_blank" rel="noopener" href="https://docs.qq.com/sheet/DSlZmRHNtREpnaFFO?tab=od4bej">极客文章精选</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/7ScWBijmR2V/folder/636a5f3ca017ebf1599a4c6f8bc0c8253599fa90">极客时间视频合集</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb5a240ec8182d53f45e8a147c15703f1b8f5">鱼皮-2021最新思维导图</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb6367f0cc8763613472688e4e32176a82453">猪厂内部U设计资料包</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb58f13f4e6609bf346e89b91db94fd9dd61d">优达学城：前端工程师</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb19dcbf4dca054f84427941b2e05af8146a7">最新Python6.0特训就业班2020年全新顶目(159G)</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bbdbfb1ed3b1f26534788a57600e83d41e320">少儿编程资料</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bbdbf42fffc04b8524ed4be3297c5c8f22dd6">有道少儿编程入门训练营</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb925d57092b1fa344d568d3f6128c175b0c0">算法与数据结构全阶班</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb931c628550a9bcc49108e1e1a6289cb3f85">极客大学-算法训练营第四期</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb8eb54fae2c6717a4836ba76c37b765e9a31">前端高手进阶</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb5b64ced44d801924893adfb28c8d8bdb8ef">爬虫学习笔记</a></p>
<h3 id="AI相关"><a href="#AI相关" class="headerlink" title="AI相关"></a>AI相关</h3><p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb60d76354d36c6ca467f9b23260e8e696db9">华为5天玩转A1实战营培训</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bbc487d03bd45d3ad4b1aaaee8a9dc011b156">幻颜ai换脸-zscc</a></p>
<h3 id="英语相关"><a href="#英语相关" class="headerlink" title="英语相关"></a>英语相关</h3><p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/JgWbuddN4Wu/folder/61ae2115a7b71333a19245a9befeab062d565948">英语资源汇总</a></p>
<p><a target="_blank" rel="noopener" href="https://pan.baidu.com/s/1SsebUiJNWQRfBman3M1zew?pwd=aqqr">四六级资源实时更新</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/k3CNHXVsxAG/folder/62b81778725cc53579b04cb9b76a274457ceb6b7">英语专四专八</a></p>
<p><a target="_blank" rel="noopener" href="https://tuo.icodeq.com/English">英语盘</a></p>
<h3 id="其他"><a href="#其他" class="headerlink" title="其他"></a>其他</h3><p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb5a3104978b6e7dc496e8a01a3477368c76c">CG人学习笔记（分版）</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb619f52bc9a3bcfe487ba46dc5024776536d">谢c!关于财富的12次认知升级：重新理解财富，停止无效的努力</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb63e0ca0c86f690447d49d169c197f53d7b4">零基础iPad插画课</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb5c0584145a724864bb594a13445c0bea1e3">家装手册</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bb5c0af6a18f2eae0441c922a7d24ee55dec5">川E.股票入门课（新版）</a>	</p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/51ux1Wc1jne/folder/626bbc998a4c3ca0fd70499db7e6c80bf6fe2b9b">室内家居装潢施工工艺视频教程</a></p>
<h2 id="三、影视娱乐"><a href="#三、影视娱乐" class="headerlink" title="三、影视娱乐"></a>三、影视娱乐</h2><p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/PJqi5XRUvXa/folder/62c06bd230993a5f7d3f4b0fad19dafd1ca98e6b">阿里云盘115T影视资源合集.xls</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/8wc8ZT2n3Rb">豆瓣top250</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/vN5pjDYdtET/folder/62f9a819704fca9bd3444fd19d9e98b138256782">影视合集</a></p>
<h2 id="四、软件"><a href="#四、软件" class="headerlink" title="四、软件"></a>四、软件</h2><p><a target="_blank" rel="noopener" href="https://www.ruancang.net/">软仓</a>:Adobe、CAD等软件大全</p>
<p><a target="_blank" rel="noopener" href="https://www.ghxi.com/?ref=xike.store&btwaf=28054969">果核剥核</a>: 各种使用软件及补丁包</p>
<p><a target="_blank" rel="noopener" href="https://www.fenxm.com/">分享迷</a>： 各种TV软件及其他软件分享</p>
<p><a target="_blank" rel="noopener" href="https://www.hezibuluo.com/">盒子部落</a></p>
<p><a target="_blank" rel="noopener" href="https://www.souruan.xyz/index.html">搜软</a>:手机应用搜索平台</p>
<h2 id="五、好站推荐"><a href="#五、好站推荐" class="headerlink" title="五、好站推荐"></a>五、好站推荐</h2><p><a target="_blank" rel="noopener" href="https://www.likebookmark.com/">喜欢书签</a></p>
<h2 id="六、导航"><a href="#六、导航" class="headerlink" title="六、导航"></a>六、导航</h2><p><a target="_blank" rel="noopener" href="http://cxy521.com/">程序员导航</a></p>
<h2 id="七、独立盘"><a href="#七、独立盘" class="headerlink" title="七、独立盘"></a>七、独立盘</h2><p><a target="_blank" rel="noopener" href="http://xikestore.ysepan.com/">禧客小店</a></p>
<p><a target="_blank" rel="noopener" href="http://dnmjun.ysepan.com/">柠檬的资源库</a></p>
 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E7%BD%91%E7%9B%98%E8%B5%84%E6%BA%90/" rel="tag">网盘资源</a></li></ul>

    </footer>
  </div>

    
 
   
  
</article>

    
    <article
  id="post-软考资料整理"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2023/04/17/%E8%BD%AF%E8%80%83%E8%B5%84%E6%96%99%E6%95%B4%E7%90%86/"
    >软考资料整理</a> 
</h2>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/04/17/%E8%BD%AF%E8%80%83%E8%B5%84%E6%96%99%E6%95%B4%E7%90%86/" class="article-date">
  <time datetime="2023-04-17T12:38:36.000Z" itemprop="datePublished">2023-04-17</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%B7%A5%E5%85%B7%E7%AE%B1/">工具箱</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <blockquote>
<p><a target="_blank" rel="noopener" href="https://pan.baidu.com/s/1rDBi6XrKxI12dHk_koN7kw?pwd=9999">软考资料分享</a></p>
<p><a target="_blank" rel="noopener" href="https://www.acfun.cn/v/ac33539204">软考高级系统架构师</a></p>
<p><a target="_blank" rel="noopener" href="https://www.ruankao.org.cn/">软考官网</a></p>
<p><a target="_blank" rel="noopener" href="https://pan.baidu.com/s/1yKJQKG1TAdliqMoMqKB1aA?pwd=zuem">软考中项</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/1ihbAFrLcWN">信息系统项目管理师教程-第四版.pdf</a>  提取码：pb93</p>
<p><a target="_blank" rel="noopener" href="https://space.bilibili.com/91286799">B站博主zst_2001</a></p>
<p><a target="_blank" rel="noopener" href="https://www.aliyundrive.com/s/sxZR5EW3qyz">软考中级-软件设计师-历年真题，答案+解析</a> 提取码：60ho</p>
<p><a target="_blank" rel="noopener" href="https://www.yuque.com/daitou-8qnsv/qqsvxx/xbgtkg">软考中级笔记</a></p>
</blockquote>
 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E8%BD%AF%E8%80%83/" rel="tag">软考</a></li></ul>

    </footer>
  </div>

    
 
   
  
</article>

    
    <article
  id="post-操作无法完成，因为文件已在其他应用打开解决办法"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2023/04/15/%E6%93%8D%E4%BD%9C%E6%97%A0%E6%B3%95%E5%AE%8C%E6%88%90%EF%BC%8C%E5%9B%A0%E4%B8%BA%E6%96%87%E4%BB%B6%E5%B7%B2%E5%9C%A8%E5%85%B6%E4%BB%96%E5%BA%94%E7%94%A8%E6%89%93%E5%BC%80%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/"
    >操作无法完成，因为文件已在其他应用打开解决办法</a> 
</h2>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/04/15/%E6%93%8D%E4%BD%9C%E6%97%A0%E6%B3%95%E5%AE%8C%E6%88%90%EF%BC%8C%E5%9B%A0%E4%B8%BA%E6%96%87%E4%BB%B6%E5%B7%B2%E5%9C%A8%E5%85%B6%E4%BB%96%E5%BA%94%E7%94%A8%E6%89%93%E5%BC%80%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/" class="article-date">
  <time datetime="2023-04-15T03:04:46.000Z" itemprop="datePublished">2023-04-15</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%B0%8F%E6%8A%80%E8%83%BD/">小技能</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <p>在删除某个文件时经常遇到文件在其他应用打开导致无法删除的情况</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202304/2233039-20230415110543408-1317219139.png" alt="image-20230415110544253"></p>
<p>此处提示的很明显时有文件在Word中打开了，只要把响应的文档关闭就行了</p>
<p>但是很多时候我们并不知道被打开的文件或程序是在哪里打开的</p>
<p>可以先复制你要删除的目录位置</p>
<p>然后按 Ctrl+Shift+Esc&#x2F; Ctrl+Alt+Del 打开资源管理器，选到性能一栏</p>
<p>点击右边三个点，有个资源监视器</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202304/2233039-20230415111053263-596248868.png" alt="image-20230415111055746"></p>
<p>打开资源监视器，在关联的句柄输入栏里输入刚才复制的文件目录位置</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202304/2233039-20230415111255097-1427333025.png" alt="image-20230415111257568"></p>
<p>然后等待检索关联的服务，结束除 <code>explorer.exe</code>以外的其他服务即可</p>
<p>注意，explorer.exe 对应的是资源管理器的服务，若该服务被结束，则电脑桌面会黑屏或者白屏</p>
<p>若不小心关闭了这个服务，可以按快捷键再次打开资源管理器，运行新任务恢复</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202304/2233039-20230415111704073-679271389.png" alt="image-20230415111706539"></p>
 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Windows%E6%8A%80%E5%B7%A7/" rel="tag">Windows技巧</a></li></ul>

    </footer>
  </div>

    
 
   
  
</article>

    
    <article
  id="post-图片防盗链导致图片无法加载解决方法"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2023/04/11/%E5%9B%BE%E7%89%87%E9%98%B2%E7%9B%97%E9%93%BE%E5%AF%BC%E8%87%B4%E5%9B%BE%E7%89%87%E6%97%A0%E6%B3%95%E5%8A%A0%E8%BD%BD%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95/"
    >图片防盗链导致图片无法加载解决方法</a> 
</h2>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/04/11/%E5%9B%BE%E7%89%87%E9%98%B2%E7%9B%97%E9%93%BE%E5%AF%BC%E8%87%B4%E5%9B%BE%E7%89%87%E6%97%A0%E6%B3%95%E5%8A%A0%E8%BD%BD%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95/" class="article-date">
  <time datetime="2023-04-11T14:38:45.000Z" itemprop="datePublished">2023-04-11</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%B0%8F%E6%8A%80%E8%83%BD/">小技能</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <p>我们在博客的时候可能最烦心的就是图片处理了</p>
<p>比如我在本地写好博客后把文章发布到博客园，或者CSDN或则和其他平台</p>
<p>但是文章中用到的图片需要一个个手动上传，费时费力</p>
<p>而且由于<a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/375235796">图片防盗链</a>的存在，各博客平台上的图片资源又不能直接引用</p>
<p><img src="https://s1.vika.cn/space/2023/04/11/868dbd04598c4b9fb7bebfb12ecfd5d5" alt="image-20230411222903960"></p>
<p>解决方案也很简单，只需要在博客生成的html页面头文件中引入一下代码片段即可</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;referrer&quot;</span> <span class="attr">content</span>=<span class="string">&quot;no-referrer&quot;</span> /&gt;</span></span><br></pre></td></tr></table></figure>



<p>以hexo博客为例（我的主题是ayer，不同主题存放位置有细微差别）</p>
<p>打开主题资源目录，一般在layout目录下找 <code>header.pug</code> 或者 <code>header.ejs</code> 文件</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202305/2233039-20230512214510881-439236974.png" alt="image-20230512214510287"></p>
<p>若为 <code>header.ejs</code> 添加以下代码</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;referrer&quot;</span> <span class="attr">content</span>=<span class="string">&quot;no-referrer&quot;</span> /&gt;</span></span><br></pre></td></tr></table></figure>

<p><img src="https://img2023.cnblogs.com/blog/2233039/202305/2233039-20230512214858721-1826705893.png" alt="image-20230512214859593"></p>
<p>若为 <code>header.pug</code> 则需要添加以下内容</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">meta(name=&quot;referrer&quot; content=&quot;no-referrer&quot;)</span><br></pre></td></tr></table></figure>

<p>然后重新生成以下网页内容</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo g</span><br></pre></td></tr></table></figure>

<p>可以发现生成的网页文件中已经包含刚才添加的这行代码</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202305/2233039-20230512215212057-1024376811.png" alt="image-20230512215212845"></p>
<p>此时再重启服务，所有图片就能正常预览了</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202305/2233039-20230512215412431-1560064676.png" alt="image-20230512215413219"></p>
<p>当然，引用其他网站的资源其实是很一件很不道德的事情，尤其是盗用他人图片的</p>
<p>推荐一个更好的解决方案，那就是使用<a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/403554101">图床</a></p>
<p><strong>参考</strong></p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://www.jianshu.com/p/5b58ecce6443">解决hexo引入图床，手机和web不显示图片的问题</a></p>
</blockquote>
<p><strong>相关推荐</strong></p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17305789.html">基于博客园搭建Typora免费图床</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17305788.html">基于CSDN搭建Typora免费图床</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17308291.html">PicGo搭建免费图床实现Typora图片自动上传</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17233460.html">Typora 图片自动上传至腾讯云Cos 服务</a></p>
</blockquote>
 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%9B%BE%E5%BA%8A/" rel="tag">图床</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E9%98%B2%E7%9B%97%E9%93%BE/" rel="tag">防盗链</a></li></ul>

    </footer>
  </div>

    
 
   
  
</article>

    
    <article
  id="post-基于CSDN搭建Typora免费图床"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2023/04/10/%E5%9F%BA%E4%BA%8ECSDN%E6%90%AD%E5%BB%BATypora%E5%85%8D%E8%B4%B9%E5%9B%BE%E5%BA%8A/"
    >基于CSDN搭建Typora免费图床</a> 
</h2>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/04/10/%E5%9F%BA%E4%BA%8ECSDN%E6%90%AD%E5%BB%BATypora%E5%85%8D%E8%B4%B9%E5%9B%BE%E5%BA%8A/" class="article-date">
  <time datetime="2023-04-10T09:11:42.000Z" itemprop="datePublished">2023-04-10</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%B0%8F%E6%8A%80%E8%83%BD/">小技能</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <meta name="referrer" content="never" />

<p>本地需要有<a target="_blank" rel="noopener" href="https://www.python.org/downloads/">python3</a>环境</p>
<p>按照  <a target="_blank" rel="noopener" href="https://pypi.org/project/requests/">requests</a>、<a target="_blank" rel="noopener" href="https://pypi.org/project/psutil/">psutil</a>、 <a target="_blank" rel="noopener" href="https://pypi.org/project/requests-toolbelt/">requests-toolbelt</a> 依赖，若已安装可忽略</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">pip install requests</span><br><span class="line">pip install psutil</span><br><span class="line">pip install requests-toolbelt</span><br></pre></td></tr></table></figure>

<p><img src="https://img-blog.csdnimg.cn/3649821ea9954a43b038ce9719bc5cff.png" alt="image-20230410172811214"></p>
<p>复制以下代码到一个.py的文件中,如我本地命名为 upd_pic_to_csdn.py</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: UTF-8 -*-</span></span><br><span class="line"><span class="string">&#x27;&#x27;&#x27;</span></span><br><span class="line"><span class="string">@文件        :csdnUpload.py</span></span><br><span class="line"><span class="string">@时间        :2022/11/24 12:48:46</span></span><br><span class="line"><span class="string">@作者        :tx</span></span><br><span class="line"><span class="string">@版本        :2.0</span></span><br><span class="line"><span class="string">@说明        :Typora利用csdn作为图床</span></span><br><span class="line"><span class="string">&#x27;&#x27;&#x27;</span></span><br><span class="line"><span class="keyword">from</span> __future__ <span class="keyword">import</span> print_function</span><br><span class="line"><span class="keyword">import</span> random</span><br><span class="line"><span class="keyword">from</span> io <span class="keyword">import</span> BytesIO</span><br><span class="line"><span class="keyword">import</span> sys</span><br><span class="line"><span class="keyword">from</span> PIL <span class="keyword">import</span> Image</span><br><span class="line"><span class="keyword">import</span> os</span><br><span class="line"><span class="keyword">from</span> threading <span class="keyword">import</span> Thread</span><br><span class="line"><span class="keyword">import</span> psutil</span><br><span class="line"><span class="keyword">import</span> re</span><br><span class="line"><span class="keyword">import</span> requests</span><br><span class="line"><span class="keyword">import</span> http.cookiejar <span class="keyword">as</span> cookielib</span><br><span class="line"><span class="keyword">import</span> time</span><br><span class="line"><span class="keyword">import</span> requests</span><br><span class="line"><span class="keyword">from</span> requests_toolbelt <span class="keyword">import</span> MultipartEncoder</span><br><span class="line"><span class="keyword">import</span> ctypes</span><br><span class="line"></span><br><span class="line">os.chdir(os.path.expanduser(<span class="string">&#x27;~&#x27;</span>))  <span class="comment"># 这是打包版本的代码</span></span><br><span class="line">requests.packages.urllib3.disable_warnings()</span><br><span class="line">session = requests.session()</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">show_code</span>(<span class="title class_ inherited__">Thread</span>):</span><br><span class="line">    <span class="keyword">def</span> <span class="title function_">__init__</span>(<span class="params">self, url</span>):</span><br><span class="line">        Thread.__init__(self)</span><br><span class="line">        self.url = url</span><br><span class="line"></span><br><span class="line">    <span class="keyword">def</span> <span class="title function_">run</span>(<span class="params">self</span>):</span><br><span class="line">        response = requests.get(self.url)</span><br><span class="line">        img = Image.<span class="built_in">open</span>(BytesIO(response.content))  <span class="comment"># 打开图片，返回PIL image对象</span></span><br><span class="line">        img.show()</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">IsLogin</span>():</span><br><span class="line">    <span class="string">&#x27;&#x27;&#x27;</span></span><br><span class="line"><span class="string">    文件读取cookie，检测cookie是否合法。</span></span><br><span class="line"><span class="string">    &#x27;&#x27;&#x27;</span></span><br><span class="line">    <span class="keyword">try</span>:</span><br><span class="line">        session.cookies = cookielib.LWPCookieJar(filename=<span class="string">&quot;.cookie/csdn.txt&quot;</span>)</span><br><span class="line">        session.cookies.load()</span><br><span class="line"></span><br><span class="line">        <span class="comment"># 修改地方</span></span><br><span class="line">        url = <span class="string">&quot;https://imgservice.csdn.net/direct/v1.0/image/upload?type=blog&amp;rtype=markdown&amp;x-image-template=&amp;x-image-app=direct_blog&amp;x-image-dir=direct&amp;x-image-suffix=png&quot;</span></span><br><span class="line">        response = session.get(url)</span><br><span class="line">        <span class="keyword">if</span> response.json()[<span class="string">&#x27;msg&#x27;</span>] == <span class="string">&quot;success&quot;</span>:</span><br><span class="line">            <span class="keyword">return</span> <span class="literal">True</span></span><br><span class="line">        <span class="keyword">else</span>:</span><br><span class="line">            <span class="keyword">return</span> <span class="literal">False</span></span><br><span class="line">    <span class="keyword">except</span> Exception <span class="keyword">as</span> e:</span><br><span class="line">        <span class="keyword">return</span> <span class="literal">False</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">Login</span>():</span><br><span class="line">    <span class="string">&#x27;&#x27;&#x27;</span></span><br><span class="line"><span class="string">    csdn自动登录，同时保存cookie</span></span><br><span class="line"><span class="string">    &#x27;&#x27;&#x27;</span></span><br><span class="line">    response = session.get(<span class="string">&#x27;https://open.weixin.qq.com/connect/qrconnect?appid=wx0ae11b6a28b4b9fc&amp;scope=snsapi_login&amp;redirect_uri=https%3A%2F%2Fpassport.csdn.net%2Fv1%2Fregister%2FpcAuthCallBack%3FpcAuthType%3Dweixin&amp;state=csdn&amp;login_type=jssdk&amp;self_redirect=default&amp;style=white&amp;href=https://csdnimg.cn/release/passport/history/css/replace-wx-style.css&#x27;</span>, verify=<span class="literal">False</span>)</span><br><span class="line">    uuid = re.findall(</span><br><span class="line">        <span class="string">&#x27;&lt;img class=&quot;qrcode lightBorder&quot; src=&quot;(.*?)&quot;&#x27;</span>, response.text)[<span class="number">0</span>]</span><br><span class="line">    img_url = <span class="string">&#x27;https://open.weixin.qq.com&#x27;</span> + uuid</span><br><span class="line">    t = show_code(img_url)</span><br><span class="line">    t.start()</span><br><span class="line">    t.join()</span><br><span class="line"></span><br><span class="line">    uuid = uuid.split(<span class="string">&#x27;/&#x27;</span>)[-<span class="number">1</span>]</span><br><span class="line">    url = <span class="string">&#x27;https://lp.open.weixin.qq.com/connect/l/qrconnect?uuid=&#x27;</span>+uuid</span><br><span class="line">    <span class="keyword">while</span> <span class="literal">True</span>:</span><br><span class="line">        response = session.get(url, verify=<span class="literal">False</span>)</span><br><span class="line">        code = re.findall(<span class="string">&quot;window.wx_code=&#x27;(.*?)&#x27;&quot;</span>, response.text)</span><br><span class="line">        <span class="keyword">if</span> code != [<span class="string">&#x27;&#x27;</span>]:</span><br><span class="line">            <span class="keyword">for</span> proc <span class="keyword">in</span> psutil.process_iter():  <span class="comment"># 遍历当前process</span></span><br><span class="line">                <span class="keyword">try</span>:</span><br><span class="line">                    <span class="keyword">if</span> proc.name() == <span class="string">&quot;Microsoft.Photos.exe&quot;</span>:</span><br><span class="line">                        proc.kill()  <span class="comment"># 关闭该process</span></span><br><span class="line">                <span class="keyword">except</span> Exception <span class="keyword">as</span> e:</span><br><span class="line">                    <span class="keyword">pass</span></span><br><span class="line">            <span class="keyword">break</span></span><br><span class="line">        time.sleep(<span class="number">0.5</span>)</span><br><span class="line"></span><br><span class="line">    url = <span class="string">&#x27;https://passport.csdn.net/v1/register/pcAuthCallBack?pcAuthType=weixin&amp;code=%s&amp;state=csdn&#x27;</span> % code[<span class="number">0</span>]</span><br><span class="line">    session.get(url)</span><br><span class="line">    session.cookies.save()</span><br><span class="line">    IsLogin()</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">UploadPic</span>(<span class="params">picList: <span class="built_in">list</span></span>):</span><br><span class="line">    <span class="string">&#x27;&#x27;&#x27;</span></span><br><span class="line"><span class="string">    图片上传</span></span><br><span class="line"><span class="string">    &#x27;&#x27;&#x27;</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> pic <span class="keyword">in</span> picList:</span><br><span class="line">        <span class="comment"># 获得图片授权</span></span><br><span class="line">        url = <span class="string">&quot;https://imgservice.csdn.net/direct/v1.0/image/upload?type=blog&amp;rtype=markdown&amp;x-image-template=&amp;x-image-app=direct_blog&amp;x-image-dir=direct&amp;x-image-suffix=png&quot;</span></span><br><span class="line">        response = session.get(url)</span><br><span class="line">        key = response.json()[<span class="string">&#x27;data&#x27;</span>]</span><br><span class="line">        upload_url = key[<span class="string">&#x27;host&#x27;</span>]</span><br><span class="line">        fields = &#123;</span><br><span class="line">            <span class="string">&#x27;key&#x27;</span>: key[<span class="string">&#x27;filePath&#x27;</span>],</span><br><span class="line">            <span class="string">&#x27;policy&#x27;</span>: key[<span class="string">&#x27;policy&#x27;</span>],</span><br><span class="line">            <span class="string">&quot;OSSAccessKeyId&quot;</span>: key[<span class="string">&#x27;accessId&#x27;</span>],</span><br><span class="line">            <span class="string">&quot;success_action_status&quot;</span>: <span class="string">&quot;200&quot;</span>,</span><br><span class="line">            <span class="string">&quot;signature&quot;</span>: key[<span class="string">&#x27;signature&#x27;</span>],</span><br><span class="line">            <span class="string">&quot;callback&quot;</span>: key[<span class="string">&#x27;callbackUrl&#x27;</span>],</span><br><span class="line">            <span class="string">&#x27;file&#x27;</span>: (os.path.basename(pic), <span class="built_in">open</span>(pic, <span class="string">&#x27;rb&#x27;</span>), <span class="string">&quot;image/png&quot;</span>),</span><br><span class="line">        &#125;</span><br><span class="line">        multipart_encoder = MultipartEncoder(</span><br><span class="line">            fields, boundary=<span class="string">&#x27;-----------------------------&#x27;</span> + <span class="built_in">str</span>(random.randint(<span class="number">1e28</span>, <span class="number">1e29</span> - <span class="number">1</span>)))</span><br><span class="line">        headers = &#123;</span><br><span class="line">            <span class="string">&#x27;content-Type&#x27;</span>: multipart_encoder.content_type,</span><br><span class="line">        &#125;</span><br><span class="line">        res = requests.post(upload_url, headers=headers,</span><br><span class="line">                            data=multipart_encoder, verify=<span class="literal">False</span>)</span><br><span class="line">        <span class="keyword">if</span> (res.status_code == <span class="number">200</span>):</span><br><span class="line">            <span class="built_in">print</span>(res.json()[<span class="string">&#x27;data&#x27;</span>][<span class="string">&#x27;imageUrl&#x27;</span>])</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> __name__ == <span class="string">&quot;__main__&quot;</span>:</span><br><span class="line"></span><br><span class="line">    <span class="comment"># session.proxies = &#123;&quot;http&quot;: &quot;http://127.0.0.1:8080&quot;,</span></span><br><span class="line">    <span class="comment">#                    &quot;https&quot;: &quot;http://127.0.0.1:8080&quot;&#125;</span></span><br><span class="line">    <span class="keyword">if</span> <span class="keyword">not</span> os.path.exists(<span class="string">&quot;.cookie&quot;</span>):</span><br><span class="line">        os.mkdir(<span class="string">&quot;.cookie&quot;</span>)</span><br><span class="line">    <span class="keyword">if</span> <span class="keyword">not</span> os.path.exists(os.path.join(<span class="string">&quot;.cookie&quot;</span>, <span class="string">&quot;csdn.txt&quot;</span>)):</span><br><span class="line">        tmep_f = <span class="built_in">open</span>(os.path.join(<span class="string">&quot;.cookie&quot;</span>, <span class="string">&quot;csdn.txt&quot;</span>), <span class="string">&#x27;w+&#x27;</span>)</span><br><span class="line">        tmep_f.close()</span><br><span class="line">    <span class="keyword">if</span> <span class="keyword">not</span> IsLogin():</span><br><span class="line">        Login()</span><br><span class="line">    UploadPic(sys.argv[<span class="number">1</span>:])</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>打开Typora 文件  &#x3D;》 偏好设置 &#x3D;》图像 设置界面，按照下图所示进行配置</p>
<p><img src="https://img-blog.csdnimg.cn/89fded2aee974391a4cec07bf8d2135c.png" alt="image-20230410172945466"></p>
<p>注意修改命令中的python文件所在目录位置</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">python D:\Files\Typora\upd_pic_to_csdn.py</span><br></pre></td></tr></table></figure>

<p>设置好后点击验证图片上传选项进行验证服务是否正常</p>
<p>首次执行命令会弹出微信扫码登录的二维码，扫描登录即可</p>
<p>查看验证结果</p>
<p><img src="https://img-blog.csdnimg.cn/7799646cce4b46f5b478bc41386ecd6d.png" alt="image-20230410171816256"></p>
<p>注意</p>
<p>图片有违规校验，例如二维码</p>
<p><img src="https://img-blog.csdnimg.cn/35d06ac00e864979aef2c0b7f4cd5f15.png" alt="image-20230410174011489"></p>
<p>另外，CSDN的图片有<a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/375235796">防盗链</a>，在其他网站引用图片可能无法加载</p>
<p><img src="https://s1.vika.cn/space/2023/04/11/868dbd04598c4b9fb7bebfb12ecfd5d5" alt="image-20230411222903960"></p>
<p><strong>相关参考</strong></p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/chouzhou9701/article/details/121113255">typora使用CSDN图床</a></p>
</blockquote>
<p><strong>相关推荐</strong></p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17305789.html">基于博客园搭建Typora免费图床</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17308291.html">PicGo搭建免费图床实现Typora图片自动上传</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17308295.html">图片防盗链导致图片无法加载解决方法</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17233460.html">Typora 图片自动上传至腾讯云Cos 服务</a></p>
</blockquote>
 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/CSDN/" rel="tag">CSDN</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Typora/" rel="tag">Typora</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%9B%BE%E5%BA%8A/" rel="tag">图床</a></li></ul>

    </footer>
  </div>

    
 
   
  
</article>

    
    <article
  id="post-基于博客园搭建Typora免费图床"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2023/04/10/%E5%9F%BA%E4%BA%8E%E5%8D%9A%E5%AE%A2%E5%9B%AD%E6%90%AD%E5%BB%BATypora%E5%85%8D%E8%B4%B9%E5%9B%BE%E5%BA%8A/"
    >基于博客园搭建Typora免费图床</a> 
</h2>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/04/10/%E5%9F%BA%E4%BA%8E%E5%8D%9A%E5%AE%A2%E5%9B%AD%E6%90%AD%E5%BB%BATypora%E5%85%8D%E8%B4%B9%E5%9B%BE%E5%BA%8A/" class="article-date">
  <time datetime="2023-04-10T08:10:59.000Z" itemprop="datePublished">2023-04-10</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%B0%8F%E6%8A%80%E8%83%BD/">小技能</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <p>本地需要有<a target="_blank" rel="noopener" href="https://www.python.org/downloads/">python3</a>环境，复制以下代码到一个.py的文件中,如我本地命名为 upd_pic_to_cnblog.py</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> os</span><br><span class="line"><span class="keyword">import</span> sys</span><br><span class="line"><span class="keyword">import</span> xmlrpc.client <span class="keyword">as</span> client</span><br><span class="line"><span class="keyword">import</span> mimetypes</span><br><span class="line"></span><br><span class="line">CONFIGS = &#123;</span><br><span class="line">    <span class="string">&quot;url&quot;</span>: <span class="string">&quot;&quot;</span>,</span><br><span class="line">    <span class="string">&quot;username&quot;</span>: <span class="string">&quot;&quot;</span>,</span><br><span class="line">    <span class="string">&quot;password&quot;</span>: <span class="string">&quot;&quot;</span>,</span><br><span class="line">    <span class="string">&quot;blogID&quot;</span>: <span class="string">&quot;&quot;</span>,</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">get_image</span>(<span class="params">image_path</span>):</span><br><span class="line">    image_mimetype = mimetypes.guess_type(image_path, <span class="literal">True</span>)[<span class="number">0</span>]</span><br><span class="line">    image_name = os.path.basename(image_path)</span><br><span class="line">    image_bits = client.Binary(<span class="built_in">open</span>(image_path, <span class="string">&#x27;rb&#x27;</span>).read())</span><br><span class="line">    image = &#123;</span><br><span class="line">        <span class="string">&quot;name&quot;</span>: image_name,</span><br><span class="line">        <span class="string">&quot;type&quot;</span>: image_mimetype,</span><br><span class="line">        <span class="string">&quot;bits&quot;</span>: image_bits,</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> image</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">upload_image</span>(<span class="params">image_path</span>):</span><br><span class="line">    image = get_image(image_path)</span><br><span class="line">    server = client.ServerProxy(CONFIGS.get(<span class="string">&quot;url&quot;</span>))</span><br><span class="line">    url = server.metaWeblog.newMediaObject(CONFIGS.get(<span class="string">&quot;blogID&quot;</span>), CONFIGS.get(<span class="string">&quot;username&quot;</span>),</span><br><span class="line">                                           CONFIGS.get(<span class="string">&quot;password&quot;</span>), image).get(<span class="string">&quot;url&quot;</span>)</span><br><span class="line">    <span class="keyword">return</span> url</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">main</span>(<span class="params">argv</span>):</span><br><span class="line">    args = <span class="built_in">iter</span>(argv)</span><br><span class="line">    <span class="built_in">next</span>(args)</span><br><span class="line">    <span class="keyword">for</span> image_path <span class="keyword">in</span> args:</span><br><span class="line">        <span class="built_in">print</span>(upload_image(image_path))</span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> __name__ == <span class="string">&quot;__main__&quot;</span>:</span><br><span class="line">    main(sys.argv)</span><br></pre></td></tr></table></figure>



<p>将代码中 CONFIGS 参数修改为自己<a target="_blank" rel="noopener" href="https://i.cnblogs.com/settings">博客园后台</a>相关参数</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">CONFIGS = &#123;</span><br><span class="line">    &quot;url&quot;: &quot;&quot;,</span><br><span class="line">    &quot;username&quot;: &quot;&quot;,</span><br><span class="line">    &quot;password&quot;: &quot;&quot;,</span><br><span class="line">    &quot;blogID&quot;: &quot;&quot;,</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>用户id可以通过自己的博客园地址查看<img src="https://img2023.cnblogs.com/blog/2233039/202304/2233039-20230410162009461-2059378039.png" alt="image-20230410162011459"></p>
<p>账号信息可以在其他设置中查看，需要允许 MetaWeblog 博客客户端访问</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202304/2233039-20230410162414980-1436891110.png" alt="image-20230410162416702"></p>
<p>修改后如下所示</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202304/2233039-20230410162854327-972406534.png" alt="image-20230410162856170"></p>
<p>打开Typora 文件  &#x3D;》 偏好设置 &#x3D;》图像 设置界面，按照下图所示进行配置</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202304/2233039-20230410163243225-258855258.png" alt="image-20230410163245197"></p>
<p>注意修改命令中的python文件所在目录位置</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">python D:\Files\Typora\upd_pic_to_cnblog.py</span><br></pre></td></tr></table></figure>

<p>设置好后点击验证图片上传选项进行验证服务是否正常</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202304/2233039-20230410163947428-1866006684.png" alt="image-20230410163949320"></p>
<p>需要注意的是，博客园图片有<a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/375235796">防盗链</a>，在其他网站引用图片可能无法加载</p>
<p><img src="https://s1.vika.cn/space/2023/04/11/b964fe9e047149a08a7194d8025b0191" alt="image-20230411223535238"></p>
<p><strong>相关参考</strong></p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/563600312">使用博客园做MarkDown图床</a></p>
</blockquote>
<p><strong>相关推荐</strong></p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17305788.html">基于CSDN搭建Typora免费图床</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17308291.html">PicGo搭建免费图床实现Typora图片自动上传</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17308295.html">图片防盗链导致图片无法加载解决方法</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17233460.html">Typora 图片自动上传至腾讯云Cos 服务</a></p>
</blockquote>
 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Typora/" rel="tag">Typora</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%8D%9A%E5%AE%A2%E5%9B%AD/" rel="tag">博客园</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%9B%BE%E5%BA%8A/" rel="tag">图床</a></li></ul>

    </footer>
  </div>

    
 
   
  
</article>

    
    <article
  id="post-PicGo搭建免费图床实现Typora图片自动上传"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2023/04/10/PicGo%E6%90%AD%E5%BB%BA%E5%85%8D%E8%B4%B9%E5%9B%BE%E5%BA%8A%E5%AE%9E%E7%8E%B0Typora%E5%9B%BE%E7%89%87%E8%87%AA%E5%8A%A8%E4%B8%8A%E4%BC%A0/"
    >PicGo搭建免费图床实现Typora图片自动上传</a> 
</h2>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/04/10/PicGo%E6%90%AD%E5%BB%BA%E5%85%8D%E8%B4%B9%E5%9B%BE%E5%BA%8A%E5%AE%9E%E7%8E%B0Typora%E5%9B%BE%E7%89%87%E8%87%AA%E5%8A%A8%E4%B8%8A%E4%BC%A0/" class="article-date">
  <time datetime="2023-04-10T07:30:31.000Z" itemprop="datePublished">2023-04-10</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%B0%8F%E6%8A%80%E8%83%BD/">小技能</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <h1 id="一、下载并PicGo"><a href="#一、下载并PicGo" class="headerlink" title="一、下载并PicGo"></a>一、下载并<a target="_blank" rel="noopener" href="https://github.com/Molunerfinn/PicGo/releases">PicGo</a></h1><blockquote>
<p><a target="_blank" rel="noopener" href="http://cpasion-docs.gitee.io/picgo-doc/zh/guide/">PicGo官方文档</a></p>
</blockquote>
<h1 id="二、PicGo图床设置"><a href="#二、PicGo图床设置" class="headerlink" title="二、PicGo图床设置"></a>二、PicGo图床设置</h1><h2 id="2-1-GitHub图床设置"><a href="#2-1-GitHub图床设置" class="headerlink" title="2.1 GitHub图床设置"></a>2.1 GitHub图床设置</h2><p>首先需要创建一个仓库用于存储图片</p>
<p>点击头像 -》Settings </p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145449928-526337598.png" alt="image-20230410201133720"></p>
<p>找到 Developer settings</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145632058-1221969082.png" alt="image-20230410211207623"></p>
<p>创建一个 token 	</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145731338-2117774436.png" alt="image-20230410211219390"></p>
<p>token有效期设置为永久，即 No expiration，Select scopes设置勾选repo</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145748060-1840901635.png" alt="image-20230410211234387"></p>
<p>创建好后会自动生成对应的令牌，请复制并保存该令牌，此令牌仅显示一次</p>
<p>按照下图所示进行配置</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145806017-937157488.png" alt="image-20230410211301847"></p>
<p>仓库名为github仓库地址</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145824994-874743511.png" alt="image-20230410211312081"></p>
<p>分支默认为master</p>
<p>Token即刚才github创建的token</p>
<p>指定存储路径即上传到仓库的文件路径，为方便管理，一个为该路径设置个日期如 img&#x2F;2023&#x2F;04&#x2F;</p>
<p>自定义域名可以使用cdn加速地址</p>
<p><code>https://cdn.staticaly.com/gh/用户名/仓库名@master</code></p>
<h2 id="2-2-vika维格表图床设置"><a href="#2-2-vika维格表图床设置" class="headerlink" title="2.2 vika维格表图床设置"></a>2.2 vika维格表图床设置</h2><p>注册并登录 <a target="_blank" rel="noopener" href="https://vika.cn/?inviteCode=74884167">vika</a>，注册的时候可以填写一下我的邀请码  <code>74884167</code> ，双方各得 1000 V币</p>
<p>在工作目录新建空白维格表</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145844393-996799073.png" alt="image-20231118145844681"></p>
<p>头像 -》 个人设置 -》基本信息 -》 邮箱绑定，绑定邮箱后才有更到操作权限</p>
<p>点击头像 -》个人设置 -》开发者配置 可以查看自己的 API Token</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145851489-1722902137.png" alt="image-20231118145851843"></p>
<p>打开PicGo，在插件设置里搜索 vikadata 并安装</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145858451-407850319.png" alt="image-20231118145858747"></p>
<p>安装完成后点击小齿轮进行配置，需要API Token 和 维格表ID</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145905697-1122737241.png" alt="image-20231118145906010"></p>
<p>打开刚才创建的维格表，点击上方的API可以查看当前维格表的API数据</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145912238-321062677.png" alt="image-20231118145912507"></p>
<p>在第二栏Get获取里可以看到当前维格表的API信息，可以点击显示API Token</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145920129-548489616.png" alt="image-20231118145920329"></p>
<h2 id="2-3-SM-MS"><a href="#2-3-SM-MS" class="headerlink" title="2.3 SM.MS"></a>2.3 SM.MS</h2><p>每个用户有5G免费空间，图片上传及加载速度略慢</p>
<p>注册并登录 <a target="_blank" rel="noopener" href="https://sm.ms/">SM.MS</a></p>
<p>注册后打开控制台</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145927343-297005866.png" alt="image-20231118145927651"></p>
<p>打开API Token 并创建</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145934295-2015353712.png" alt="image-20231118145934542"></p>
<p>将生成的Token填写到PicGo中，备用上传域名填写 <code>smms.app</code> 否则会上传失败</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145942382-621116632.png" alt="image-20231118145942649"></p>
<p>PicGo需要升级到 2.3.1版本，否则不支持备用上传域名设置，下图为官方升级公告</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145949226-854349132.png" alt="image-20231118145949466"></p>
<h2 id="2-4-七牛云"><a href="#2-4-七牛云" class="headerlink" title="2.4 七牛云"></a>2.4 七牛云</h2><p>注册认证后有10G永久免费空间，每月10G国内和10G国外流量</p>
<p>需要绑定域名才能使用，注册送30天测试域名，30天后测试域名会被回收</p>
<p>注册并登录<a target="_blank" rel="noopener" href="https://portal.qiniu.com/">七牛云</a></p>
<p>绑定邮箱并实名认证</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118145957757-439342520.png" alt="image-20231118145957956"></p>
<p>打开对象存储Kodo界面</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118150003865-1874076209.png" alt="image-20231118150004128"></p>
<p>新建空间，访问权限选择公开</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118150009527-1902721469.png" alt="image-20231118150009774"></p>
<p>PicGo设置</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118150015155-342973609.png" alt="image-20231118150015465"></p>
<p>AccessKey 和 SecreKey 可以在密钥管理中获取</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118150020941-1404137474.png" alt="image-20231118150021220"></p>
<p>Bucket即空间名称，访问域名地址为 CDN测试域名，该域名一个月后会被回收</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118150026700-927233752.png" alt="image-20231118150026791"></p>
<p>存储区域</p>
<table>
<thead>
<tr>
<th>存储区域 Region</th>
<th>区域 Region ID</th>
</tr>
</thead>
<tbody><tr>
<td>华东-浙江</td>
<td>z0</td>
</tr>
<tr>
<td>华东-浙江2</td>
<td>cn-east-2</td>
</tr>
<tr>
<td>华北-河北</td>
<td>z1</td>
</tr>
<tr>
<td>华南-广东</td>
<td>z2</td>
</tr>
</tbody></table>
<p>详情见官方文档说明</p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://developer.qiniu.com/kodo/1671/region-endpoint-fq">区域和访问域名</a></p>
</blockquote>
<h2 id="2-5-Gitee图床"><a href="#2-5-Gitee图床" class="headerlink" title="2.5 Gitee图床"></a>2.5 Gitee图床</h2><p>Gitee官方不允许用Gitee搭建个人图床，会有封号风险</p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://www.zhihu.com/question/524094354/answer/2408710720">有什么好用的图床推荐，gitee图床挂了吗？</a></p>
</blockquote>
<h1 id="三、PicGo上传测试"><a href="#三、PicGo上传测试" class="headerlink" title="三、PicGo上传测试"></a>三、PicGo上传测试</h1><p>可以在上传区进行测试，此处以GitHub图床为例</p>
<p>上传成功后会自动将图片路径复制到剪切板</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118150045432-592682410.png" alt="image-20230410211320863"></p>
<p>可以在相册里查看已经上传的图片或者在github仓库中进行查看</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118150103845-424713520.png" alt="image-20230410211327724"></p>
<p>若文件过大可以用在线压缩工具将图片进行压缩后上传</p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://tinypng.com/">免费下线图片压缩工具</a></p>
<p><a target="_blank" rel="noopener" href="https://imagecompressor.com/zh/">图片无损压缩</a></p>
<p><a target="_blank" rel="noopener" href="https://www.iloveimg.com/resize-image">修改图片尺寸工具</a></p>
</blockquote>
<p>推荐启用开机自启和时间戳重命名</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118150110734-172991659.png" alt="image-20231118150111028"></p>
<h1 id="四、Typora设置"><a href="#四、Typora设置" class="headerlink" title="四、Typora设置"></a>四、Typora设置</h1><p>按照如图所示进行配置，PicGo路径PicGo程序所在位置</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118150128228-716434699.png" alt="image-20230410210409320"></p>
<p>点击验证图片上传选线进行验证</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202311/2233039-20231118150146409-1068611024.png" alt="image-20230410210353344"></p>
<h1 id="五、参考及推荐"><a href="#五、参考及推荐" class="headerlink" title="五、参考及推荐"></a>五、参考及推荐</h1><p>相关参考</p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://www.bilibili.com/video/BV18G411G7ah">【最新博客图床方案】国内免费高速图床 | 最新github图床 | 解决jsdelivr的问题 |</a></p>
</blockquote>
<p>相关推荐</p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17305789.html">基于博客园搭建Typora免费图床</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17305788.html">基于CSDN搭建Typora免费图床</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17233460.html">Typora 图片自动上传至腾讯云Cos 服务</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17308295.html">图片防盗链导致图片无法加载解决方法</a></p>
</blockquote>
 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/PicGo/" rel="tag">PicGo</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Typora/" rel="tag">Typora</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%9B%BE%E5%BA%8A/" rel="tag">图床</a></li></ul>

    </footer>
  </div>

    
 
   
  
</article>

    
    <article
  id="post-VMware提示模块Disk启动失败，未能启动虚拟机"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2023/04/07/VMware%E6%8F%90%E7%A4%BA%E6%A8%A1%E5%9D%97Disk%E5%90%AF%E5%8A%A8%E5%A4%B1%E8%B4%A5%EF%BC%8C%E6%9C%AA%E8%83%BD%E5%90%AF%E5%8A%A8%E8%99%9A%E6%8B%9F%E6%9C%BA/"
    >VMware提示模块Disk启动失败，未能启动虚拟机</a> 
</h2>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/04/07/VMware%E6%8F%90%E7%A4%BA%E6%A8%A1%E5%9D%97Disk%E5%90%AF%E5%8A%A8%E5%A4%B1%E8%B4%A5%EF%BC%8C%E6%9C%AA%E8%83%BD%E5%90%AF%E5%8A%A8%E8%99%9A%E6%8B%9F%E6%9C%BA/" class="article-date">
  <time datetime="2023-04-07T05:24:45.000Z" itemprop="datePublished">2023-04-07</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E8%B8%A9%E5%9D%91/">踩坑</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <p>由于我的虚拟机是非正常关闭，再次启动时出现如下错误</p>
<p><img src="https://s1.vika.cn/space/2023/04/07/dafacc1e3e3c41f28f6d0cd93232f3ee" alt="image-20230407132707070"></p>
<p>找到该文件所在目录.vmx后缀的文件，用文本编辑器进行编辑</p>
<p><img src="https://s1.vika.cn/space/2023/04/07/97d7e6b5124e4577aa09a1d9771c56ad" alt="image-20230407133031761"></p>
<p>搜索 <code>vmci0.present</code> 将 TURE 改为 FALSE</p>
<p><img src="https://s1.vika.cn/space/2023/04/07/c848d5e961874071bab00ea9123a0449" alt="image-20230407132949388"></p>
<p>删除错误提示文件所在目录  .lck 结尾的文件，重新启动虚拟机即可</p>
<p><img src="https://s1.vika.cn/space/2023/04/07/54ef265b56f049e4bfed9791fe40cdde" alt="image-20230407133354750"></p>
<p>相关参考</p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/sylar5/p/12051681.html">VMWare虚拟机显示模块“Disk”启动失败</a></p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/qq_44913716/article/details/122582942">虚拟机报错模块“Disk”启动失败。 未能启动虚拟机</a></p>
</blockquote>
 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/VMware/" rel="tag">VMware</a></li></ul>

    </footer>
  </div>

    
 
   
  
</article>

    
    <article
  id="post-Hexo基于LeanCloud搭建评论功能"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2023/04/03/Hexo%E5%9F%BA%E4%BA%8ELeanCloud%E6%90%AD%E5%BB%BA%E8%AF%84%E8%AE%BA%E5%8A%9F%E8%83%BD/"
    >Hexo基于LeanCloud搭建评论功能</a> 
</h2>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/04/03/Hexo%E5%9F%BA%E4%BA%8ELeanCloud%E6%90%AD%E5%BB%BA%E8%AF%84%E8%AE%BA%E5%8A%9F%E8%83%BD/" class="article-date">
  <time datetime="2023-04-03T07:17:25.000Z" itemprop="datePublished">2023-04-03</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%B0%8F%E6%8A%80%E8%83%BD/">小技能</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <p>1、注册LeanCloud</p>
<p><a target="_blank" rel="noopener" href="https://console.leancloud.cn/">LeanCloud官网</a></p>
<p>2、实名认证</p>
<p>使用LeanCloud功能需要进行实名认证</p>
<p><img src="https://s1.vika.cn/space/2023/04/03/3da5b00b5b3747c181825bedf039b4a1" alt="image-20230403151923032"></p>
<p>3、验证邮箱</p>
<p><img src="https://s1.vika.cn/space/2023/04/03/4602082a323645fbb8eb136d85cb0463" alt="image-20230403152408478"></p>
<p>4、创建应用</p>
<p><img src="https://s1.vika.cn/space/2023/04/03/3d156ba42eec4d6ab8a9c28311e47b71" alt="image-20230403153255119"></p>
<p>5、查看应用凭证</p>
<p><img src="https://s1.vika.cn/space/2023/04/03/9270f9673b98445abd73f1a4ebc1e11e" alt="image-20230403154228598"></p>
<p>6、修改当前主题配置文件中的 leancloud 配置</p>
<p><img src="https://s1.vika.cn/space/2023/04/03/9fee9c82d8ed41d194e23d5a64ed3c3e" alt="image-20230403160353507"></p>
<p>8、绑定域名</p>
<p><img src="https://s1.vika.cn/space/2023/04/03/984cfb258a0e43ad84b63949fe23380e" alt="image-20230403154840679"></p>
<p>9、重新部署服务</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"># 生成网页</span><br><span class="line">hexo g</span><br><span class="line"># 推送到远程服务</span><br><span class="line">hexo d</span><br><span class="line"># 启动服务</span><br><span class="line">hexo s</span><br></pre></td></tr></table></figure>

<p>10、测试</p>
<p><img src="https://s1.vika.cn/space/2023/04/03/04fffaf6f68c440085c733147c5047ad" alt="image-20230403160645540"></p>
<p>11、查看api提交记录</p>
<p><img src="https://s1.vika.cn/space/2023/04/03/1c3ec4f58c4e48a8a513e95368ceca71" alt="image-20230403161415517"></p>
<p>相关参考</p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://valine.js.org/">Valine官网</a></p>
<p><a target="_blank" rel="noopener" href="https://www.jianshu.com/p/0b4cf14663f7">hexo添加评论功能</a></p>
<p><a target="_blank" rel="noopener" href="https://moonshuo.cn/posts/51359.html">Hexo中Buttefly主题Valine评论系统配置以及美化（七）</a></p>
</blockquote>
 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/LeanCloud/" rel="tag">LeanCloud</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/hexo/" rel="tag">hexo</a></li></ul>

    </footer>
  </div>

    
 
   
  
</article>

    
    <article
  id="post-git推送提示the-remote-end-hung-up-unexpectedly错误"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2023/04/03/git%E6%8E%A8%E9%80%81%E6%8F%90%E7%A4%BAthe-remote-end-hung-up-unexpectedly%E9%94%99%E8%AF%AF/"
    >git推送提示the remote end hung up unexpectedly错误</a> 
</h2>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/04/03/git%E6%8E%A8%E9%80%81%E6%8F%90%E7%A4%BAthe-remote-end-hung-up-unexpectedly%E9%94%99%E8%AF%AF/" class="article-date">
  <time datetime="2023-04-03T03:41:12.000Z" itemprop="datePublished">2023-04-03</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E8%B8%A9%E5%9D%91/">踩坑</a>
  </div>
   
    </div>
      
    <div class="article-entry" itemprop="articleBody">
       
  <p>1、问题描述</p>
<p>由于我提交文件过大，往远程推送时提示一下错误</p>
<p><img src="https://s1.vika.cn/space/2023/04/03/c3f20dfe25d84015a21374400acee2a8" alt="image-20230403114753854"></p>
<p>经过排查，发现待推送的文件中有个压缩包文件很大，而gitee默认仅支持 100M</p>
<p><img src="https://s1.vika.cn/space/2023/04/03/794256f2d86444c3a9c3a75b62773adb" alt="image-20230403115137532"></p>
<p>经过各种百度，都是说设置一下缓存大小就行了</p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://www.jianshu.com/p/3f2fe584782e">git 推拉出现 “fatal: The remote end hung up unexpectedly” 解决方案</a></p>
</blockquote>
<p>但是我改了一个很大的数值之后提交仍然报错</p>
<p>最后干脆重新拉项目，把那个文件忽略，重新提交然后就推送成功了</p>
<p><strong>最新解决方案</strong></p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17840677.html">Git因文件过大导致提交失败解决方案</a></p>
</blockquote>
 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <footer class="article-footer">
       
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Git/" rel="tag">Git</a></li></ul>

    </footer>
  </div>

    
 
   
  
</article>

    
  </article>
  

  
  <nav class="page-nav">
    
    <a class="extend prev" rel="prev" href="/page/4/">上一页</a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/3/">3</a><a class="page-number" href="/page/4/">4</a><span class="page-number current">5</span><a class="page-number" href="/page/6/">6</a><a class="page-number" href="/page/7/">7</a><a class="page-number" href="/page/8/">8</a><a class="extend next" rel="next" href="/page/6/">下一页</a>
  </nav>
  
</section>
</div>

      <footer class="footer">
  <div class="outer">
    <ul>
      <li>
        Copyrights &copy;
        2023
        <i class="ri-heart-fill heart_icon"></i> Shiguang
      </li>
    </ul>
    <ul>
      <li>
        
      </li>
    </ul>
    <ul>
      <li>
        
        
        <span>
  <span><i class="ri-user-3-fill"></i>Visitors:<span id="busuanzi_value_site_uv"></span></span>
  <span class="division">|</span>
  <span><i class="ri-eye-fill"></i>Views:<span id="busuanzi_value_page_pv"></span></span>
</span>
        
      </li>
    </ul>
    <ul>
      
    </ul>
    <ul>
      
    </ul>
    <ul>
      <li>
        <!-- cnzz统计 -->
        
        <script type="text/javascript" src='https://s9.cnzz.com/z_stat.php?id=1278069914&amp;web_id=1278069914'></script>
        
      </li>
    </ul>
  </div>
</footer>    
    </main>
    <div class="float_btns">
      <div class="totop" id="totop">
  <i class="ri-arrow-up-line"></i>
</div>

<div class="todark" id="todark">
  <i class="ri-moon-line"></i>
</div>

    </div>
    <aside class="sidebar on">
      <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/"><img src="/images/ayer-side.svg" alt="時光"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/archives">归档</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/categories">分类</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags">标签</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/friends">友链</a>
    </li>
    
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      
      <a class="nav-item-link nav-item-search"  title="Search">
        <i class="ri-search-line"></i>
      </a>
      
      
      <a class="nav-item-link" target="_blank" href="/atom.xml" title="RSS Feed">
        <i class="ri-rss-line"></i>
      </a>
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
    </aside>
    <div id="mask"></div>

<!-- #reward -->
<div id="reward">
  <span class="close"><i class="ri-close-line"></i></span>
  <p class="reward-p"><i class="ri-cup-line"></i>请我喝杯咖啡吧~</p>
  <div class="reward-box">
    
    <div class="reward-item">
      <img class="reward-img" src="/images/alipay.jpg">
      <span class="reward-type">支付宝</span>
    </div>
    
    
    <div class="reward-item">
      <img class="reward-img" src="/images/wechat.jpg">
      <span class="reward-type">微信</span>
    </div>
    
  </div>
</div>
    
<script src="/js/jquery-3.6.0.min.js"></script>
 
<script src="/js/lazyload.min.js"></script>

<!-- Tocbot -->

<script src="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.js"></script>
<link
  rel="stylesheet"
  href="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.css"
/>
<script src="https://cdn.staticfile.org/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js"></script>

<script src="/dist/main.js"></script>

<!-- ImageViewer -->
 <!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>

    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">

        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                <!--  Controls are self-explanatory. Order can be changed. -->

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                        <div class="pswp__preloader__cut">
                            <div class="pswp__preloader__donut"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div>
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div>

<link rel="stylesheet" href="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe.min.css">
<link rel="stylesheet" href="https://cdn.staticfile.org/photoswipe/4.1.3/default-skin/default-skin.min.css">
<script src="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe.min.js"></script>
<script src="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe-ui-default.min.js"></script>

<script>
    function viewer_init() {
        let pswpElement = document.querySelectorAll('.pswp')[0];
        let $imgArr = document.querySelectorAll(('.article-entry img:not(.reward-img)'))

        $imgArr.forEach(($em, i) => {
            $em.onclick = () => {
                // slider展开状态
                // todo: 这样不好，后面改成状态
                if (document.querySelector('.left-col.show')) return
                let items = []
                $imgArr.forEach(($em2, i2) => {
                    let img = $em2.getAttribute('data-idx', i2)
                    let src = $em2.getAttribute('data-target') || $em2.getAttribute('src')
                    let title = $em2.getAttribute('alt')
                    // 获得原图尺寸
                    const image = new Image()
                    image.src = src
                    items.push({
                        src: src,
                        w: image.width || $em2.width,
                        h: image.height || $em2.height,
                        title: title
                    })
                })
                var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, {
                    index: parseInt(i)
                });
                gallery.init()
            }
        })
    }
    viewer_init()
</script> 
<!-- MathJax -->

<!-- Katex -->

<!-- busuanzi  -->
 
<script src="/js/busuanzi-2.3.pure.min.js"></script>
 
<!-- ClickLove -->

<!-- ClickBoom1 -->

<!-- ClickBoom2 -->

<!-- CodeCopy -->
 
<link rel="stylesheet" href="/css/clipboard.css">
 <script src="https://cdn.staticfile.org/clipboard.js/2.0.10/clipboard.min.js"></script>
<script>
  function wait(callback, seconds) {
    var timelag = null;
    timelag = window.setTimeout(callback, seconds);
  }
  !function (e, t, a) {
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '<i class="ri-file-copy-2-line"></i><span>COPY</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      $(".article pre code").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });
      clipboard.on('success', function(e) {
        let $btn = $(e.trigger);
        $btn.addClass('copied');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-checkbox-circle-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPIED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-checkbox-circle-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
      clipboard.on('error', function(e) {
        e.clearSelection();
        let $btn = $(e.trigger);
        $btn.addClass('copy-failed');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-time-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPY FAILED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-time-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
    }
    initCopyCode();
  }(window, document);
</script>
 
<!-- CanvasBackground -->

<script>
  if (window.mermaid) {
    mermaid.initialize({ theme: "forest" });
  }
</script>


    
    

  </div>
</body>

</html>